From c5c75ece065d98b98cea8dc6758e9b0c2a3c509b Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 26 Jun 2000 23:44:19 +0000 Subject: [PATCH] Put 1.3.1 in warning message, not 1.3.0. Mon Jun 26 19:37:04 2000 Owen Taylor * configure.in: Put 1.3.1 in warning message, not 1.3.0. (Fixes problem with drawing childless frames. Pointed out by and a first patch from Anders) * gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always compute a child_allocation, even if we don't have a child. * gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation): Always chain to the parent's impl, even if we don't have a child. --- ChangeLog | 13 +++++++++++++ ChangeLog.pre-2-0 | 13 +++++++++++++ ChangeLog.pre-2-10 | 13 +++++++++++++ ChangeLog.pre-2-2 | 13 +++++++++++++ ChangeLog.pre-2-4 | 13 +++++++++++++ ChangeLog.pre-2-6 | 13 +++++++++++++ ChangeLog.pre-2-8 | 13 +++++++++++++ configure.in | 2 +- gtk/gtkaspectframe.c | 2 ++ gtk/gtkframe.c | 36 +++++++++++++++++------------------- 10 files changed, 111 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8e6cf56a5..0655a76048 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Mon Jun 26 19:37:04 2000 Owen Taylor + + * configure.in: Put 1.3.1 in warning message, not 1.3.0. + + (Fixes problem with drawing childless frames. Pointed out + by and a first patch from Anders) + + * gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always + compute a child_allocation, even if we don't have a child. + + * gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation): + Always chain to the parent's impl, even if we don't have a child. + Mon Jun 26 18:53:31 2000 Owen Taylor * gdk/gdkrgb.c: If possible, create only a single shm segment and diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f8e6cf56a5..0655a76048 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,16 @@ +Mon Jun 26 19:37:04 2000 Owen Taylor + + * configure.in: Put 1.3.1 in warning message, not 1.3.0. + + (Fixes problem with drawing childless frames. Pointed out + by and a first patch from Anders) + + * gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always + compute a child_allocation, even if we don't have a child. + + * gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation): + Always chain to the parent's impl, even if we don't have a child. + Mon Jun 26 18:53:31 2000 Owen Taylor * gdk/gdkrgb.c: If possible, create only a single shm segment and diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f8e6cf56a5..0655a76048 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,16 @@ +Mon Jun 26 19:37:04 2000 Owen Taylor + + * configure.in: Put 1.3.1 in warning message, not 1.3.0. + + (Fixes problem with drawing childless frames. Pointed out + by and a first patch from Anders) + + * gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always + compute a child_allocation, even if we don't have a child. + + * gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation): + Always chain to the parent's impl, even if we don't have a child. + Mon Jun 26 18:53:31 2000 Owen Taylor * gdk/gdkrgb.c: If possible, create only a single shm segment and diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f8e6cf56a5..0655a76048 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,16 @@ +Mon Jun 26 19:37:04 2000 Owen Taylor + + * configure.in: Put 1.3.1 in warning message, not 1.3.0. + + (Fixes problem with drawing childless frames. Pointed out + by and a first patch from Anders) + + * gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always + compute a child_allocation, even if we don't have a child. + + * gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation): + Always chain to the parent's impl, even if we don't have a child. + Mon Jun 26 18:53:31 2000 Owen Taylor * gdk/gdkrgb.c: If possible, create only a single shm segment and diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f8e6cf56a5..0655a76048 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,16 @@ +Mon Jun 26 19:37:04 2000 Owen Taylor + + * configure.in: Put 1.3.1 in warning message, not 1.3.0. + + (Fixes problem with drawing childless frames. Pointed out + by and a first patch from Anders) + + * gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always + compute a child_allocation, even if we don't have a child. + + * gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation): + Always chain to the parent's impl, even if we don't have a child. + Mon Jun 26 18:53:31 2000 Owen Taylor * gdk/gdkrgb.c: If possible, create only a single shm segment and diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f8e6cf56a5..0655a76048 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,16 @@ +Mon Jun 26 19:37:04 2000 Owen Taylor + + * configure.in: Put 1.3.1 in warning message, not 1.3.0. + + (Fixes problem with drawing childless frames. Pointed out + by and a first patch from Anders) + + * gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always + compute a child_allocation, even if we don't have a child. + + * gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation): + Always chain to the parent's impl, even if we don't have a child. + Mon Jun 26 18:53:31 2000 Owen Taylor * gdk/gdkrgb.c: If possible, create only a single shm segment and diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f8e6cf56a5..0655a76048 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,16 @@ +Mon Jun 26 19:37:04 2000 Owen Taylor + + * configure.in: Put 1.3.1 in warning message, not 1.3.0. + + (Fixes problem with drawing childless frames. Pointed out + by and a first patch from Anders) + + * gtk/gtkframe.c (gtk_frame_compute_child_allocation): Always + compute a child_allocation, even if we don't have a child. + + * gtk/gtkaspectframe.c (gtk_aspect_frame_compute_child_allocation): + Always chain to the parent's impl, even if we don't have a child. + Mon Jun 26 18:53:31 2000 Owen Taylor * gdk/gdkrgb.c: If possible, create only a single shm segment and diff --git a/configure.in b/configure.in index a66940bb53..2d60e79be2 100644 --- a/configure.in +++ b/configure.in @@ -279,7 +279,7 @@ if test x$with_glib = x ; then AM_PATH_GLIB(1.3.1,, AC_MSG_ERROR([ -*** GLIB 1.3.0 or better is required. The latest version of GLIB +*** GLIB 1.3.1 or better is required. The latest version of GLIB *** is always available from ftp://ftp.gtk.org/.]), gobject gmodule gthread) diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c index 8040a1471d..00fbde6c15 100644 --- a/gtk/gtkaspectframe.c +++ b/gtk/gtkaspectframe.c @@ -282,4 +282,6 @@ gtk_aspect_frame_compute_child_allocation (GtkFrame *frame, child_allocation->x = full_allocation.x + aspect_frame->xalign * (full_allocation.width - child_allocation->width); child_allocation->y = full_allocation.y + aspect_frame->yalign * (full_allocation.height - child_allocation->height); } + else + parent_class->compute_child_allocation (frame, child_allocation); } diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index dc58e68f82..f063b9356b 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -506,29 +506,27 @@ gtk_frame_size_allocate (GtkWidget *widget, { GtkFrame *frame = GTK_FRAME (widget); GtkBin *bin = GTK_BIN (widget); + GtkAllocation new_allocation; widget->allocation = *allocation; + gtk_frame_compute_child_allocation (frame, &new_allocation); + + /* If the child allocation changed, that means that the frame is drawn + * in a new place, so we must redraw the entire widget. + */ + if (GTK_WIDGET_MAPPED (widget) && + (new_allocation.x != frame->child_allocation.x || + new_allocation.y != frame->child_allocation.y || + new_allocation.width != frame->child_allocation.width || + new_allocation.height != frame->child_allocation.height)) + gtk_widget_queue_clear (widget); + if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) - { - GtkAllocation new_allocation; - - gtk_frame_compute_child_allocation (frame, &new_allocation); - - /* If the child allocation changed, that means that the frame is drawn - * in a new place, so we must redraw the entire widget. - */ - if (GTK_WIDGET_MAPPED (widget) && - (new_allocation.x != frame->child_allocation.x || - new_allocation.y != frame->child_allocation.y || - new_allocation.width != frame->child_allocation.width || - new_allocation.height != frame->child_allocation.height)) - gtk_widget_queue_clear (widget); - - gtk_widget_size_allocate (bin->child, &new_allocation); - frame->child_allocation = new_allocation; - } - + gtk_widget_size_allocate (bin->child, &new_allocation); + + frame->child_allocation = new_allocation; + if (frame->label_widget && GTK_WIDGET_VISIBLE (frame->label_widget)) { GtkRequisition child_requisition; -- 2.30.2